package com.ruoyi.project.equipment.service.impl;


import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.equipment.mapper.UserEquipmentMapper;
import com.ruoyi.project.equipment.domain.UserEquipment;
import com.ruoyi.project.equipment.service.UserEquipmentService;

/**
 * 用户与设备关联Service业务层处理
 *
 * @author ruoyi
 * @date 2020-07-12
 */
@Service
public class UserEquipmentServiceImpl implements UserEquipmentService
{
    @Autowired
    private UserEquipmentMapper userEquipmentMapper;

    /**
     * 查询用户与设备关联
     *
     * @param id 用户与设备关联ID
     * @return 用户与设备关联
     */
    @Override
    public UserEquipment selectUserEquipmentById(Long id)
    {
        return userEquipmentMapper.selectUserEquipmentById(id);
    }

    /**
     * 查询用户与设备关联列表
     *
     * @param userEquipment 用户与设备关联
     * @return 用户与设备关联
     */
    @Override
    public List<UserEquipment> selectUserEquipmentList(UserEquipment userEquipment)
    {
        return userEquipmentMapper.selectUserEquipmentList(userEquipment);
    }

    /**
     * 新增用户与设备关联
     *
     * @param userEquipment 用户与设备关联
     * @return 结果
     */
    @Override
    public int insertUserEquipment(UserEquipment userEquipment)
    {
        return userEquipmentMapper.insertUserEquipment(userEquipment);
    }

    /**
     * 修改用户与设备关联
     *
     * @param userEquipment 用户与设备关联
     * @return 结果
     */
    @Override
    public int updateUserEquipment(UserEquipment userEquipment)
    {
        return userEquipmentMapper.updateUserEquipment(userEquipment);
    }

    /**
     * 批量删除用户与设备关联
     *
     * @param ids 需要删除的用户与设备关联ID
     * @return 结果
     */
    @Override
    public int deleteUserEquipmentByIds(Long[] ids)
    {
        return userEquipmentMapper.deleteUserEquipmentByIds(ids);
    }

    /**
     * 删除用户与设备关联信息
     *
     * @param id 用户与设备关联ID
     * @return 结果
     */
    @Override
    public int deleteUserEquipmentById(Long id)
    {
        return userEquipmentMapper.deleteUserEquipmentById(id);
    }
}